package LanQiaoCompetition2;

public class Quanzuhe {

    static String str = "abcde";
    static int result;

    public static void main(String[] args){
        f("",3,0);
        System.out.println(result);
    }

    public static void f(String s2,int n,int k){
        if(n<=0){
            System.out.println(s2);
            result++;
            return;
        }
        if(k>= str.length()){
            return;
        }

        f(s2,n,k+1);
        s2 += str.charAt(k);
        f(s2,n-1,k+1);
    }
}
